package com.chinafree.business.model.enumeration;

public enum DegreeEnum {

    NO(0,"不限"),
    BACHELOR(1, "大专"),
    MASTER(2, "本科"),
    DOCTOR(3, "硕士"),
    HIGH(4, "博士")


    ;

    public void setName(String name) {
        this.name = name;
    }

    private Integer id;
    private String name;

    DegreeEnum(Integer id, String name) {
        this.id = id;
        this.name = name;
    }

    public Integer getId() {
        return id;
    }

    public String getName() {
        return name;
    }

    public static String getName(Integer id) {
        for (DegreeEnum degreeEnum : DegreeEnum.values()) {
            if (degreeEnum.getId().equals(id)) {
                return degreeEnum.getName();
            }
        }
        return null;
    }
}
